import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index'
import product from '@/views/product'
import linkUs from '@/views/linkUs'
import service from '@/views/service'
import apiDetail from '@/views/apiDetail'
import servicelist from '@/components/servicelist'
import serviceother from '@/components/servicelist2'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },
    {
      path: '/product',
      name: 'product',
      component: product
    },
    {
      path: '/linkUs',
      name: 'linkUs',
      component: linkUs
    },
    {
      path: '/service',
      name: 'service',
      component: service,
      children: [
        {
          path: 'test',
          component: servicelist
        },
        {
          path: 'others',
          component: serviceother
        },
        {
          path: 'recipe',
          component: servicelist
        }
      ]
    },
    {
      path: '/apiDetail',
      name: 'apiDetail',
      component: apiDetail
    }
  ],
  mode: 'history'
})
